﻿namespace Compass.Maui.Services;

public interface INavigationService
{
    Task NavigateToAsync(string route, Dictionary<string, object?> routeParameters = null);
}
public class NavigationService : INavigationService
{
    public Task NavigateToAsync(string route, Dictionary<string, object?> routeParameters = null)
    {
        return routeParameters is null
            ? Shell.Current.GoToAsync(route)
            : Shell.Current.GoToAsync(route, routeParameters);
    }
}